<template>
  <div @click="event" class='confirm _card'>
    <div>confirm</div>
    <div>{{props.aaa}}</div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  aaa:{
    type:String,
    default:'000'
  },
  showUnMounted:{
    type:Function,
    required:true
  }
})
// const emits = defineEmits('showUnMounted')
const event = ()=>{
  console.log(props.showUnMounted());
  
}
onMounted(()=>{
  console.log(props.aaa);
  
})
onUnmounted(()=>{
  console.log('销毁了');
})

</script>
<style lang="scss" scoped>
.confirm{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgb(255, 178, 76);
}
</style>